Skip to content

(fix): FDE Forms should display in the O3 Refapp #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Twiineenock
Copy link

@Twiineenock Twiineenock commented Jun 3, 2025

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
  • My work conforms to the OpenMRS 3.0 Styleguide.
  • My work includes tests or is validated by existing tests.

Summary

This PR introduces minimal but essential support for triggering and completing a FormEngine submission within the Fast Data Entry (FDE) workflow. The changes revolve around the SUBMIT_FOR_COMPLETE action in the workflow reducer, enabling seamless coordination between the FDE and the FormEngine.

🔁 What’s Changed

  • Trigger FormEngine submission:
    Added window.dispatchEvent(new CustomEvent('triger-form-engine-submit')) to notify the FormEngine to start submission when the FDE reaches SUBMIT_FOR_COMPLETE.

  • Handle post-submission flow:
    Listens for form-submission-complete and performs cleanup:

    • Removes the active form from session state.
    • Persists the updated state.
    • Navigates back to the forms list.

✅ Why it matters

These changes allow FDE workflows to correctly hand over form submission responsibility to the FormEngine and respond to its success state. It ensures that the session is properly cleaned up only after the form has been successfully submitted.

Screenshots

RFE-4-FDE

Screancasts

https://www.loom.com/share/193799987e0848a0b20e0575a462a3de?sid=4162802f-4e39-4c1a-93e9-8e50a21651ae

Related Issue

Other

These are the related PRs;
React Form Engine: openmrs/openmrs-esm-form-engine-lib#550

Patient Chart: openmrs/openmrs-esm-patient-chart#2476

@Twiineenock Twiineenock force-pushed the feat/fix-fde-for-refApp branch from 313e694 to 2abf055 Compare June 18, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant